package com.xbjtech.mapper;

import com.xbjtech.model.User;
import com.xbjtech.model.UserExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

public interface UserMapper {
	
	@Select("select * from t_user where username=#{username} and password=#{password}")
	User selectUserByUsernameAndPassword(@Param("username") String username, @Param("password") String password);
	
	@Select("select * from t_user where username=#{username}")
    User selectUserByUsername(String username);
	
	long countByExample(UserExample example);

    int deleteByExample(UserExample example);

    int deleteByPrimaryKey(Long id);

    int insert(User record);

    int insertSelective(User record);

    List<User> selectByExample(UserExample example);

    User selectByPrimaryKey(Long id);

    int updateByExampleSelective(@Param("record") User record, @Param("example") UserExample example);

    int updateByExample(@Param("record") User record, @Param("example") UserExample example);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);
}